import {CircleNode, CircleNodeModel, h} from "@logicflow/core";

class MarkNodeModel extends CircleNodeModel {
    initNodeData(data) {
        super.initNodeData(data);
        this.r = 20; // 设置圆半径

        // 默认不设置文字
        this.text = {
            // 空字符串
            value: ' ',
            x: this.x,
            y: this.y,
            draggable: false,
            editable: false // 这行是关键
        };

        this.setProperties({
            nodeType: "MARK",
            type: 'MARK',
            category: 'MARK',
        });
    }

    getNodeStyle() {
        const style = super.getNodeStyle();
        style.stroke = "#E01E5B"; // 可自定义颜色
        style.fill = "#E01E5B";  // 背景色可选
        return style;
    }

}

class MarkNodeView extends CircleNode {

}

export default {
    type: "MarkNode",
    view: MarkNodeView,
    model: MarkNodeModel
};
